package com.spzx.test1.MythreadPoolDemo;
/*
    并非全力
*/

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class test1 {
    public static void main(String[] args) {
        //获取线程池对象
        ExecutorService pool1 = Executors.newCachedThreadPool();
        //提交任务submit
        pool1.submit(new MyRunnable());
        pool1.submit(new MyRunnable());
        pool1.submit(new MyRunnable());
        pool1.submit(new MyRunnable());
        pool1.submit(new MyRunnable());
        pool1.submit(new MyRunnable());
        //关闭线程池
//        pool1.shutdown();

    }

}
